<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
class CreateMiniProgramTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('mini_program', function (Blueprint $table) {
            $table->id();
            $table->string("appid")->comment("小程序标识")->nullable();
            $table->string("access_token")->comment("全局调用凭证")->nullable();
            $table->integer("expire_time")->comment("记录获取access_token的时间")->nullable();
        });
        DB::statement("ALTER TABLE `mini_program` comment'tp用小程序配置表'");//表注释
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('mini_program');
    }
}
